package com.zz.hhbl.entity

import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
import org.locationtech.jts.geom.Coordinate

@Parcelize
data class FenceEntity(
    val coordinates: List<LatLonEntity>? = listOf(),
    val id: String? = "",
    val latitude: Double = 0.0,
    val longitude: Double = 0.0,
    val message: String? = "",//提示语
    val name: String? = "",
    val radius: Double = 0.0,
    val status: String? = "",
    val trigger: String? = "", //trigger 1 不能出去 2 不能进入
    val type: String? = "" //circle 圆形 ， polygon 多边形
): Parcelable

@Parcelize
data class LatLonEntity(
    val latitude: Double = 0.0,
    val longitude: Double = 0.0
) : Parcelable{
    fun toCoordinates(): Coordinate{
        return Coordinate(longitude,latitude)
    }
}